:root {
    --background-dark: rgba(16, 18, 27, 0.4);
    --background-light: rgba(146, 151, 179, 0.13);
    --border-color: rgba(113, 119, 144, 0.25);
    --accent-pink: rgb(242, 84, 132);
    --accent-blue: rgb(50, 182, 231);
    --accent-purple: rgb(154, 76, 237);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --card-background: rgba(146, 151, 179, 0.13);
}

#dataflux-ai-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--background-dark);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    z-index: 2147483647;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    border-left: 1px solid var(--border-color);
    color: var(--text-primary);
}

#dataflux-ai-sidebar.visible {
    right: 0;
}

.dataflux-sidebar-header {
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-dark);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.dataflux-sidebar-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    background: linear-gradient(to right, var(--accent-pink), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dataflux-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--background-light);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.dataflux-close-btn:hover {
    background: var(--card-background);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.dataflux-close-btn svg {
    width: 18px;
    height: 18px;
}

.dataflux-sidebar-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); /* 减去header高度 */
    overflow: hidden;
}

.dataflux-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    color: var(--text-primary);
    background: transparent;
}

.dataflux-sidebar-footer {
    height: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--background-dark);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: relative;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dataflux-action-buttons {
    display: flex;
    gap: 8px;
}

.dataflux-action-btn {
    flex: 1;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--background-light);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    padding: 0 16px;
}

.dataflux-action-btn:hover {
    background: var(--card-background);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.dataflux-action-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.dataflux-action-btn.summary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
}

.dataflux-action-btn.mindmap {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
    border: none;
}

.dataflux-input-group {
    display: flex;
    gap: 12px;
}

/* 更新输入框和发送按钮的容器 */
.dataflux-input-group {
    display: flex;
    gap: 12px;
    width: 100%;
}

.dataflux-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.4;
    resize: none;
    font-family: inherit;
    background: var(--background-light);
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.dataflux-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(50, 182, 231, 0.1);
}

.dataflux-input::placeholder {
    color: var(--text-secondary);
}

.dataflux-send-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: white;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    transition: all 0.2s ease;
    padding: 0;
}

.dataflux-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 84, 132, 0.2);
}

.dataflux-send-btn:disabled {
    background: var(--background-light);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dataflux-send-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.dataflux-sidebar-resize {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    cursor: ew-resize;
    background: linear-gradient(to bottom, var(--accent-pink), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dataflux-sidebar-resize:hover {
    opacity: 0.5;
}

/* 滚动条样式 */
.dataflux-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.dataflux-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.dataflux-sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.dataflux-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 消息气泡样式 */
.message-bubble {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    max-width: 85%;
    word-wrap: break-word;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.message-user {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: var(--text-primary);
    margin-left: auto;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(242, 84, 132, 0.1);
}

.message-assistant {
    background: var(--background-light);
    color: var(--text-primary);
    margin-right: auto;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 动画效果 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-bubble {
    animation: slideIn 0.3s ease forwards;
} 